package com.book_management.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;

import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;

/**
 * @author xiangqian
 * @date 2022/12/1 15:46
 * @description:
 */
@TableName("sys_user")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "用户对象", description = "用户表")
public class SysUser implements Serializable {

    @ApiModelProperty("用户id")
    private Long id;

    @Pattern(regexp = "^[\\d\\*]{11}$", message = "联系手机号输入有误")
    @ApiModelProperty("用户手机号")
    private String phone;

    @ApiModelProperty("用户名")
    private String name;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("年龄")
    private Integer age;

    @ApiModelProperty("性别")
    private String sex;

    @ApiModelProperty("地址")
    private String address;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("借书数量")
    private Integer borrowNum;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("最后更新时间")
    private Date finalTime;

    @ApiModelProperty("删除时间")
    private Date deleteTime;

}
